
import InitForm from "../InitForm";
import { Drawer } from "antd";
import React, { useState, memo } from 'react';

// title="Basic Drawer"
// placement="right"
// closable={false}
// onClose={this.onClose}
// visible={this.state.visible}
// getContainer={false}
// style={{ position: 'absolute' }}



function DrawInitForm(props) {
    let newProps = { ...props };
    delete newProps.children;
    return (
        <Drawer
            maskClosable={true}
            closable={false}
            placement="right"
            destroyOnClose={true}
            {...props}
        >
            {
                props.children ?
                    props.children :
                    <InitForm
                        {...newProps}
                        style={{ marginTop: -24 }}
                    ></InitForm>
            }

        </Drawer>
    );
}

export default DrawInitForm